package com.ht.circuitbreaker;

import com.ht.circuitbreaker.start.CircuitBreaker;

public class  App{
    public static void main(String[] args) throws Exception {
        CircuitBreaker b = new CircuitBreaker();

        for (int i=0;i<1000;i++) {

            System.out.println(i);

            Thread.sleep(90);
            b.run(()->{
                throw new RuntimeException();
            });
        }
    }
}